<link href="/theme/Default/css/shop/shopDetail.css" rel="stylesheet">
<link href="/theme/Default/css/member/manage.css" rel="stylesheet">
	<div id="stalls-add">
		<h4 class="stalls_header "><i class="glyphicon glyphicon-shopping-cart"></i> Gian hàng của <?php echo $username; ?></h4>
		<?php if (!empty($shop)): ?>
		<div class="tabs-container">
		<div class="tab-content">
			<table class="table table-striped">
				<tbody>
			    	
					<tr>
			            <td class = 'row'>
			            	<div class="tab-detail">
							  <div class="detail-one">
									<a class="picture_x_small" href="/gian-hang/<?php echo $shop['Shop']['short_url'] ?>" target="_blank" rel="nofollow">
								<img width="68.81720430107526" maxwidth="80" maxheight="80" src="/<?php echo $shop['Shop']['logo_image']?>" height="80">
								</a>
								</div>
								<div class="detail-two">
									<div class="detail-title">
										<div class="company_name">
											<a class="text_link" href="/gian-hang/<?php echo $shop['Shop']['short_url'] ?>" target="_blank">
												<?php echo $shop['Shop']['shop_name']?>
											</a>
										</div>
										
									</div>
									<div class="address"><b><?php echo $shop['Shop']['address']?></b></div>
									<div class="clear"></div>
									<div class="phone">Điện thoại : <?php echo $shop['Shop']['phone_number']?></div>
									<div class="website">
										<a class="text_link_2" href="http://<?php echo $shop['Shop']['website'];?>" target="_blank" rel="nofollow"><?php echo $shop['Shop']['website']?></a>
									</div>
								</div>
							</div>
			            </td>
				            
				    </tr>
			    </tbody>
			</table>
		</div>
	</div>
		<?php else: ?>
			<p>Bạn chưa tạo gian hàng, hãy tạo gian hàng mới để quảng bá sản phẩm của bạn!</p>
		<?php endif ?>
	</div>


<div class="tabs-container">
<div class="tab-content">
	<div id="stalls-add">
	<h4 class="stalls_header"><i class="glyphicon glyphicon-share"></i> Các tin <?php echo $username; ?> đã đăng
			</h4>
	</div>
	<?php if (!empty($posts)): ?>
	  	<div role="tabpanel" class="tab-pane active" id="tab-all" style='padding-left:15px;'>
	  	<table class="table table-striped">
		        <thead>
		          <tr>
		            <th>STT</th>
		            <th>Tin đăng</th>
		            <th>Tình trạng</th>
		          </tr>
		        </thead>
		        <tbody>
		        	<?php $i = 1; ?>
		        	<?php foreach ($posts as $item): ?>
		        		<tr>
				            <td><?php echo $i++; ?></td>
				            <td class = 'row'>
				            	<div class="tab-detail">
								  <div class="detail-one">
								  		<?php $url = "/detail/".$item['Post']['short_url'] ;?> 
										<a href=
											"<?php echo $item['Post']['check_status'] == 1?$url:"javascript:void(0)"; ?>">
											<img src="/<?php echo $item['Post']['image_icon']?>"/>
										</a>
									</div>
									<div class="detail-two">
										<div class="detail-title">
											<a href=
											"<?php echo $item['Post']['check_status'] == 1?$url:"javascript:void(0)"; ?>"
											><?php echo $item['Post']['title_vn']?></a>
										</div>
										<div class="detail-price">
											<?php echo number_format($item['Post']['price']);?> VNĐ
										</div>
									</div>
								</div>
				            </td>
				            <td class='status'>
				            	<?php if ($item['Post']['check_status']): ?>
				            		<div>Đã duyệt</div>
				            	<?php else: ?>
				            		<div>Chưa duyệt</div>
				            	<?php endif ?>
				            </td>
				           
				          </tr>
		        	<?php endforeach ?>
		        </tbody>
		    </table>
	  	</div>
	</div>
	<?php else: ?>
		<div id="stalls-add">
		<p>Chưa có tin đăng nào, bạn hãy tạo tin đăng để quảng bá sản phẩm!
				</p>
		</div>
<?php endif ?>
</div>
</div>
